<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }
        body {
            background: url(images/bg_green.jpg) no-repeat center center;
            background-size: cover;
        }
        .nav {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            width: 700px;
            height: 200px;
            margin: 100px auto;
            border: 1px solid #ccc;
            padding: 10px;
            background-color: rgba(255, 255, 255, 0.7);
        }
        img {
            width: 150px;
            height: 200px;
            object-fit: cover;
            border-radius: 8px;
            cursor: pointer;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }
        img:hover {
            transform: scale(1.1);
            opacity: 0.8;
        }
        button {
            margin-top: 20px;
            padding: 10px 20px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <div class="nav">
        <img src="images/bg_green.jpg" alt="">
        <img src="images/bg_gray_orange.jpg" alt="">
        <img src="images/bg_purple.jpg" alt="">
        <img src="images/bg_yellow.jpg" alt="">
    </div>
    <button id="resetButton">Reset Background</button>

    <script>
        var images = document.querySelector('.nav').querySelectorAll('img');
        for (var i = 0; i < images.length; i++) {
            images[i].onclick = function() {
                document.body.style.backgroundImage = 'url(' + this.src + ')';
            }
        }

        document.getElementById('resetButton').onclick = function() {
            document.body.style.backgroundImage = 'url(images/bg_green.jpg)'; // Set your default image path
        }
    </script>
</body>
</html>
